package com.suos.conf;

import cn.hutool.core.util.IdUtil;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.validation.annotation.Validated;

import javax.validation.constraints.Min;

/**
 * des : 配置文件类
 *
 * @author : MisShi
 * @since : 2021-08-24 11:41:31
 */
@Data
@Validated
@Configuration("suOsProperties")
@ConfigurationProperties(prefix = "sugar.oshi")
public class SuOsProperties {

    /**
     * 服务器的唯一标识
     */
    private String unbid = IdUtil.fastSimpleUUID();


    /**
     * CPU-计算时间间隔(毫秒)
     */
    @Min(value = 0, message = "请检查:sugar.oshi.wait-second")
    private int waitSecond = 1000;


}
